/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[欢迎加盟知启蒙，一起邂逅框架梦]
 * 
 * https://www.zhiqim.com/gitcan/zhiqim/zhiqim_account.htm
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.zhiqim.account.dbo.user;

import java.io.Serializable;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 用户验证表 对应表《USER_VERIFICATION》
 */
@AnAlias("UserVerification")
@AnNew
@AnTable(table="USER_VERIFICATION", key="VERIFICATION_ID", type="InnoDB")
public class UserVerification implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="USER_ACCOUNT", type="string,32", notNull=true)    private String userAccount;    //1.用户账号，手机号、邮箱
    @AnTableField(column="VERIFICATION_ID", type="long", notNull=true)    private long verificationId;    //2.验证信息编号
    @AnTableField(column="VERIFICATION_TYPE", type="byte", notNull=true)    private int verificationType;    //3.验证类型，0：注册验证，1：忘记密码，2：修改手机号，3：修改邮箱
    @AnTableField(column="VERIFICATION_CODE", type="string,6", notNull=true)    private String verificationCode;    //4.验证码
    @AnTableField(column="VERIFICATION_STATUS", type="int", notNull=true)    private int verificationStatus;    //5.验证码状态，0：未使用，1：已使用，2：失效
    @AnTableField(column="VERIFICATION_DATE", type="string,10", notNull=true)    private String verificationDate;    //6.发送日期，yyyy-MM-dd
    @AnTableField(column="VERIFICATION_END_TIME", type="string,19,char", notNull=true)    private String verificationEndTime;    //7.验证码失效时间

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getUserAccount()
    {
        return userAccount;
    }

    public void setUserAccount(String userAccount)
    {
        this.userAccount = userAccount;
    }

    public long getVerificationId()
    {
        return verificationId;
    }

    public void setVerificationId(long verificationId)
    {
        this.verificationId = verificationId;
    }

    public int getVerificationType()
    {
        return verificationType;
    }

    public void setVerificationType(int verificationType)
    {
        this.verificationType = verificationType;
    }

    public String getVerificationCode()
    {
        return verificationCode;
    }

    public void setVerificationCode(String verificationCode)
    {
        this.verificationCode = verificationCode;
    }

    public int getVerificationStatus()
    {
        return verificationStatus;
    }

    public void setVerificationStatus(int verificationStatus)
    {
        this.verificationStatus = verificationStatus;
    }

    public String getVerificationDate()
    {
        return verificationDate;
    }

    public void setVerificationDate(String verificationDate)
    {
        this.verificationDate = verificationDate;
    }

    public String getVerificationEndTime()
    {
        return verificationEndTime;
    }

    public void setVerificationEndTime(String verificationEndTime)
    {
        this.verificationEndTime = verificationEndTime;
    }

}
